import request from '@/utils/request'

//获取页面信息
export function getDetail(data) {
  return request({
    url: '/renovation/planningBudget/backAdministration/detail',
    method: 'post',
    formData:data
  })
}
// 获取项目基础数据
export function getBasicData (data) {
  return request({
    url: '/renovation/planningBudget/project/detail',
    method: 'post',
    formData: data
  })
}

// 获取项目预算编制基础数据
export function planningBudgetBasicDetail (data) {
  return request({
    url: '/renovation/planningBudget/result/baseDetail',
    method: 'post',
    formData: data
  })
}
// 获取流程列表
export function examineOpinionList (data) {
  return request({
    url: '/renovation/examineOpinion/list',
    method: 'post',
    formData: data
  })
}

// 保存市局入库备案行政审查意见(1st)
export function saveBackAdministration(data) {
  return request({
    url: '/renovation/planningBudget/backAdministration/save',
    method: 'post',
    json: data
  })
}

// 添加审查意见
export function addReviewOpinion(data) {
  return request({
    url: "/renovation/examineOpinion/add",
    method: 'post',
    formData:data
  })
}

// 处理参数为url query方式
function makeQueryToPrams(url, data) {
  let link = url
  if(link.indexOf('?') == -1) {
    link += '?'
  }
  for (let i in data) {
    link += i + '=' + data[i] + '&'
  }
  return link
}
